package com.resjz.milddog.controller;


import com.purgeteam.cloud.dispose.starter.Result;
import com.resjz.milddog.service.dept.DeptService;
import com.resjz.milddog.service.menu.MenuService;
import com.resjz.milddog.vo.dept.DeptVo;
import com.resjz.milddog.vo.menu.MenuVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Slf4j
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @PostMapping(value = "/getArr")
    public Result getArr() {
        return Result.ofSuccess(menuService.getDeptArr()) ;
    }
    @PostMapping(value = "/addMenu")
    public Result addDept(@RequestBody MenuVo menu) {
        return menuService.addSave(menu);
    }
    /*@PostMapping(value = "/delDept")
    public Result delDept(Long deptId) {
        return deptService.delDept(deptId);
    }*/
}
